﻿<Page x:ConnectionId='1'
    x:Class="Saku_Overclock.Views.ShellPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:helpers="using:Saku_Overclock.Helpers"
    xmlns:behaviors="using:Saku_Overclock.Behaviors"
    xmlns:i="using:Microsoft.Xaml.Interactivity"
                     >

    <Grid>
        <Grid x:ConnectionId='2' x:Name="AppTitleBar"
              Canvas.ZIndex="1"
              Height="{Binding ElementName=NavigationViewControl, Path=CompactPaneLength}"
              IsHitTestVisible="True"
              VerticalAlignment="Top">
            <Image Source="/Assets/WindowIcon.ico"
                   HorizontalAlignment="Left"
                   Width="16"
                   Height="16" />
            <TextBlock x:ConnectionId='8' x:Name="AppTitleBarText"
                       VerticalAlignment="Center"
                       TextWrapping="NoWrap"
                       Style="{StaticResource CaptionTextBlockStyle}"
                       Margin="28,0,0,0"/>
        </Grid>
        <NavigationView x:ConnectionId='3'
            x:Name="NavigationViewControl"
            Canvas.ZIndex="0"
            IsBackButtonVisible="Visible"
                                                                         
                                                                   
            IsSettingsVisible="True"
            ExpandedModeThresholdWidth="1280"
                                                                         
                                                                                       >
            <NavigationView.MenuItems>
                <!--
                TODO: Update item titles by updating <x:Uid>.Content entries in Strings/en-us/Resources.resw.
                https://docs.microsoft.com/windows/uwp/app-resources/localize-strings-ui-manifest#refer-to-a-string-resource-identifier-from-xaml
            
                TODO: Update item icons by updating FontIcon.Glyph properties.
                https://docs.microsoft.com/windows/apps/design/style/segoe-fluent-icons-font#icon-list
                -->
                <NavigationViewItem x:Uid="Shell_Главная" helpers:NavigationHelper.NavigateTo="Saku_Overclock.ViewModels.ГлавнаяViewModel">
                    <NavigationViewItem.Icon>
                        <FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="&#xf157;"/>
                    </NavigationViewItem.Icon>
                </NavigationViewItem>
                <NavigationViewItem x:Uid="Shell_Пресеты" helpers:NavigationHelper.NavigateTo="Saku_Overclock.ViewModels.ПресетыViewModel">
                    <NavigationViewItem.Icon>
                        <FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="&#xeadf;"/>
                    </NavigationViewItem.Icon>
                </NavigationViewItem>
                <NavigationViewItem x:Uid="Shell_Параметры" helpers:NavigationHelper.NavigateTo="Saku_Overclock.ViewModels.ПараметрыViewModel">
                    <NavigationViewItem.Icon>
                        <FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="&#xe945;"/>
                    </NavigationViewItem.Icon>
                </NavigationViewItem>
                <NavigationViewItem x:Uid="Shell_Информация" helpers:NavigationHelper.NavigateTo="Saku_Overclock.ViewModels.ИнформацияViewModel">
                    <NavigationViewItem.Icon>
                        <FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="&#xe950;"/>
                    </NavigationViewItem.Icon>
                </NavigationViewItem>
            </NavigationView.MenuItems>
            <NavigationView.HeaderTemplate>
                <DataTemplate>
                    <Grid>
                        <TextBlock
                            Text="{Binding}"
                            Style="{ThemeResource TitleTextBlockStyle}" />
                    </Grid>
                </DataTemplate>
            </NavigationView.HeaderTemplate>
            <i:Interaction.Behaviors>
                <behaviors:NavigationViewHeaderBehavior x:ConnectionId='5'
                                                                                                      >
                    <behaviors:NavigationViewHeaderBehavior.DefaultHeaderTemplate>
                        <DataTemplate>
                            <Grid>
                                <TextBlock
                                    Text=" "
                                    Style="{ThemeResource TitleTextBlockStyle}" />
                            </Grid>
                        </DataTemplate>
                    </behaviors:NavigationViewHeaderBehavior.DefaultHeaderTemplate>
                </behaviors:NavigationViewHeaderBehavior>
            </i:Interaction.Behaviors>
            <Grid Margin="{StaticResource NavigationViewPageContentMargin}">
                <Frame x:ConnectionId='7' x:Name="NavigationFrame" />
            </Grid>
        </NavigationView>
    </Grid>
</Page>

